﻿namespace Mp3Observer.Interfaces
{
    using System;
    using Mp3Observer.Model;

    /// <summary>
    /// Contract for MessageBox to show a single message of the BrowseForFolderDialog.
    /// </summary>
    public interface IMessageBox
    {
        /// <summary>
        /// Occurs when [message box closed event].
        /// </summary>
        event EventHandler MessageBoxClosedEvent;

        /// <summary>
        /// Occurs when [show message event].
        /// </summary>
        event EventHandler<MessageEventArgs> ShowMessageEvent;

        /// <summary>
        /// Occurs when [show folder dialog event].
        /// </summary>
        event EventHandler<MessageEventArgs> ShowFolderDialogEvent;

        /// <summary>
        /// Shows the message.
        /// </summary>
        /// <param name="message">The message.</param>
        void ShowMessage(string message);

        /// <summary>
        /// Shows the message and wait.
        /// </summary>
        /// <param name="message">The message.</param>
        void ShowMessageAndWait(string message);

        /// <summary>
        /// Messages the box closed.
        /// </summary>
        void MessageBoxClosed();

        /// <summary>
        /// Browses for folder dialog and wait.
        /// </summary>
        /// <param name="defaultPath">The default path.</param>
        /// <returns>The selected path.</returns>
        string BrowseForFolderDialogAndWait(string defaultPath);

        /// <summary>
        /// Called when the dialog is closed.   
        /// </summary>
        /// <param name="path">The selected path.</param>
        void FolderDialogClosed(string path);
    }
}
